using System;
using System.ComponentModel;
using UnityEditor;
using UnityEngine;

public class GameDate : MonoBehaviour
{
    private int _score;
    public int Score
    {
        get => _score;
        set
        {
            _score = value;
            OnPropertyChanged();
        }
    }
    private Action action;
    protected void OnPropertyChanged()
    {
        action?.Invoke();
    }
    public void AddListen(Action action)
    {
        this.action += action;
    }
    public void RemoveListen(Action action)
    {
        this.action -= action;
    }
}
